const api = require('../utils/request.js')
module.exports = {
  // 查询所有启动的服务设施类型以及对应的服务设施
  facilityList: function (query) {
    return api.request({
      url: '/wechatt/facility/list'
    })
  },
  //获取营地列表
  campList: function (query) {
    return api.request({
      url: '/wechatt/camp/list',
      method: 'get',
      query
    })
  },
  // 删除营地表
  delCamp: function (campId) {
    return api.request({
      url: '/wechatt/camp/' + campId,
      method: 'delete'
    })
  },
  getFacilities(id){
    return api.request({
      url:'/wechatt/facility/getInfo/'+id,
      method:'GET',
    })
  },
  // 添加营地
  addcamp:function (data){
    return api.request({
      url:'/wechatt/camp/addCamp',
      method:'post',
      data
    })
  },
   // 上传服务设施
   addService(data){
    return api.request({
      url:"/wechatt/campfacility/add",
      method:"POST",
      data
    })
  },
  // 获取营地详情
  campDetail(campId){
    return api.request({
      url:'/wechatt/camp/'+ campId,
      method:'GET',
    })
  }
}